<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/jQery.js"></script>
    <script src="./js/ajax.js"></script>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        .head{
            height: 100px;
            background-color: #ccc;
        }
        .wrapper{
            padding: 0 100px;
            margin: 0 auto;
        }
        .head .wrapper{
            display: flex;
            justify-content: space-between;
            padding-top: 30px;
        }
        .head button{
            width: 60px;
            height: 30px;
        }
        .box{
            display: flex;
            justify-content: space-between;
        }
        .left{
            width: 20%;
            height: 600px;
            background-color: #666;
        }
        .right{
            width: 80%;
            height: 600px;
            background-color: #888;
            overflow: auto;
        }
        h3{
            width: 100%;
            background-color: black;
            color: #fff;
            height: 60px;
            line-height: 60px;
            padding-left: 40px;
            cursor: pointer;
        }
        ul ul li{
            width: 100%;
            height: 60px;
            background-color: black;
            color: #fff;
            padding-left: 60px;
            line-height: 60px;
            cursor: pointer;
        }
        .s{
            display: block;
        }
        ul ul{
            display: none;
        }



        .right #tab{
            width: 100%;
            border-collapse: collapse;
        }
        td{
            /* border: 1px solid #000; */
            /* height: 100px; */
            text-align: center;
        }
        td img{
            height: 100px;
        }
        th{
            border: 1px solid #000;
            height: 20px;
        }
        .gl{
            width: 230px;
        }
        .xia{
            height: 50px;
        }
        tr{
            height: 120px;
        }
    </style>
</head>
<body>
    <div class="head">
        <div class="wrapper">
            <h2>普通公司</h2>
            <button>退出</button>
        </div>
    </div>
    <div class="box">
        <div class="left">
            <ul id="nav">
                <li>
                    <h3>员工信息</h3>
                    <ul class="s">
                        <li class="cha">查询员工</li>
                        <li class="jia">添加员工</li>
                    </ul>
                </li>
                <li>
                    <h3>员工信息</h3>
                    <ul>
                        <li>查询员工</li>
                        <li>添加员工</li>
                    </ul>
                </li>
            </ul>
        </div>
        <div class="right">
            <table id="tab">
                <tr>
                    <th>编号</th>
                    <th>姓名</th>
                    <th>入职时间</th>
                    <th>加入时间</th>
                    <th>曾任职</th>
                    <th>新职位</th>
                    <th>星级</th>
                    <th>照片</th>
                </tr>
                <tr id="tr"></tr>
            </table>
        </div>
    </div>
</body>
<script>
    var m=sessionStorage.zz
    if(!m){
        location.href="./11.html"
    }

    $(document).ready(function(){
        $("h3").click(function(){
            $(this).next().show().parent().siblings().children("ul").hide()
        })
        $('.cha').click(function(){
            $('.sou').css('display','block')
        })
        $('.jia').click(function(){
            location.href="./33.html"
        })
    })

    var a=sessionStorage.dat
    var arr=JSON.parse(a)

        var tr=document.getElementById("tr")
        var s=location.search.slice(1)
        console.log(arr[s])
        for(var k in arr[s]){
            var td=document.createElement('td')
            if(k=="path_coach"){
                td.innerHTML="<img src='http://www.qhdlink-student.top/"+arr[s][k]+"'>";
            }else{
                td.innerHTML=arr[s][k];
            }
            tr.appendChild(td)
        }
</script>
</html>